
const formatTime = date => {
  const hour = date.getHours()
  const minute = date.getMinutes()

  return `${[hour,minute].map(formatNumber).join(':')}`
}
const formatNumber = n => {
  n = n.toString()
  return n[1] ? n : `0${n}`
  
}

module.exports = {
  formatTime
}

